import { request } from '@/utils/request.js'

/**
 * 公共菜单 API JS
 */

export default {

  /**
   * 获取公共菜单分页列表
   * @returns
   */
  getList (params = {}) {
    return request({
      url: 'site/publicMenu/index',
      method: 'get',
      params
    })
  },

  /**
   * 发布公共菜单
   * @returns
   */
  publish (data = {}) {
    return request({
      url: 'site/publicMenu/publish',
      method: 'post',
      data
    })
  },

  /**
   * 取消发布公共菜单
   * @returns
   */
  unPublish (data = {}) {
    return request({
      url: 'site/publicMenu/unPublish',
      method: 'post',
      data
    })
  },

}